﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ICM_Requisition_Cut_Stock.aspx.cs" Inherits="KPIS.GERP.GIMS.APP.APP_UI.Edit_Form.ICM_Requisition_Cut_Stock" %>

<html >
<head id="Head1" runat="server">
    <title>รายละเอียดของทุกหน่วยงานที่มีการขอเบิกของ</title>
    <link rel="StyleSheet" href="../../Styles/StyleSheet.css" type="text/css"/>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePageMethods="true" >
    </asp:ScriptManager>
    <telerik:RadCodeBlock ID="RadCodeBlock2" runat="server">
          <script type="text/javascript" src="../../Scripts/Common.js"></script>
          <script type="text/javascript">
              function DetailChangeNumber(requisiton_des_item,JobSiteSeq,icm_res_item_seq,movement_code,cutstock_real_quantity,requisition_code)
              {
                   radopen("../Add_Form/ICM_Number_Cut_Stock.aspx"+ "?requisiton_des_item="+requisiton_des_item+"&JobSiteSeq="+JobSiteSeq+"&icm_res_item_seq="+icm_res_item_seq+"&movement_code="+movement_code+"&cutstock_real_quantity="+cutstock_real_quantity+"&requisition_code="+requisition_code ,"WindowDetail");
              }
              function closeRadWindow(sender, args) 
              {
                   $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest();
              }
          </script>
     </telerik:RadCodeBlock>
              <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
                      <script type="text/javascript" src="../../Scripts/Common.js"></script>
                      <script type="text/javascript">
                      </script>        
              </telerik:RadCodeBlock>        
              <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest">
                   <AjaxSettings>
                        <telerik:AjaxSetting AjaxControlID="Panel1">
                            <UpdatedControls>
                                <telerik:AjaxUpdatedControl ControlID="Panel1" LoadingPanelID="RadAjaxLoadingPanel1" />
                                <telerik:AjaxUpdatedControl ControlID="Panel2" LoadingPanelID="RadAjaxLoadingPanel1" />
                            </UpdatedControls>
                        </telerik:AjaxSetting>
                    </AjaxSettings>
               </telerik:RadAjaxManager>
       <%--<div class="moduleContent1000">
                <div class="moduleDivBottom1000">
                      <asp:Panel ID="Panel5" runat="server" CssClass="contentPaneDiv" Height="30px" ScrollBars="Auto" >
                          <table cellpadding="0" cellspacing="0">
                              <tr class="command-list">
                                       <td style="border: none">
                                            <asp:LinkButton ID="btnSave" runat="server" CssClass="LinkButton"  onclick="btnSave_Click">
                                                <img style="border:0px;vertical-align:middle;" alt="" src="../Image/Grid/Cmd_Save.gif" />&nbsp;&nbsp;บันทึกข้อมูล
                                            </asp:LinkButton>
                                        </td>
                                        <td class="command-item">
                                            <asp:LinkButton ID="btnCancel" runat="server" CssClass="LinkButton"  onclick="btnCancel_Click" CausesValidation="false">
                                                <img style="border:0px;vertical-align:middle;" alt="" src="../Image/Grid/Cancel.gif" />&nbsp;&nbsp;ยกเลิก
                                                <asp:Label ID="hInventoryItem" runat = "server" Visible = "false" />
                                                <asp:Label ID="hRequestQuantity" runat = "server" Visible = "false" />
                                                <asp:Label ID="hJobSiteSeq" runat ="server" Visible="false" />
                                            </asp:LinkButton>
                                        </td>
                               </tr>
                          </table>
                      </asp:Panel>
                  </div>
        </div>        --%>
       <div class="moduleContent1000">
                    <div class="moduleDivBottom1000">
                             <asp:Panel ID="Panel1" runat="server" CssClass="contentPaneDiv" Height="475px" ScrollBars="Auto" align = "center" >             
                                         <fieldset >
                                                        <legend><asp:Label ID="lblTitle" runat="server" Font-Bold="true" Text ="รายละเอียดของผู้เบิกของ" align="center"/></legend>
                                                        <div class="formList-detail">       
                                                               <table align ="center">                     
                                                                             <tr>
                                                                                    <td>
                                                                                         <asp:Label CssClass="font-label" runat = "server" ID= "lblRequisitionDate" Text = "วันที่ขอเบิกของ          : " Font-Bold="true" Width="150px"/>
                                                                                    </td>
                                                                                    <td>
                                                                                         <asp:Label CssClass="font-label" runat = "server" ID= "pRequisitionDate" Text = "rrr" Font-Bold="true" Width="300px"/>
                                                                                    </td>
                                                                                    <td>
                                                                                         <asp:Label CssClass="font-label" runat = "server" ID= "lblRequisitionCode" Text = "เลขที่ขอเบิกของ          : " Font-Bold="true" Width="150px"/>
                                                                                    </td>
                                                                                    <td>
                                                                                         <asp:Label CssClass="font-label" runat = "server" ID= "pRequisitionCode" Text = "rrr" Font-Bold="true" Width="300px"/>
                                                                                    </td>
                                                                             </tr>
                                                                             <tr>
                                                                                    <td>
                                                                                         <asp:Label CssClass="font-label" runat = "server" ID= "lblEmployeeName" Text = "ชื่อผู้ขอเบิกของ          : " Font-Bold="true" Width="150px"/>
                                                                                    </td>
                                                                                    <td>
                                                                                         <asp:Label CssClass="font-label" runat = "server" ID= "pEmployeeName" Text = "rrr" Font-Bold="true" Width="300px"/>
                                                                                    </td>
                                                                                    <td>
                                                                                         <asp:Label CssClass="font-label" runat = "server" ID= "lblOrganizeName" Text = "หน่วยงานที่ผู้ขอสังกัด          : " Font-Bold="true" Width="150px"/>
                                                                                    </td>
                                                                                    <td>
                                                                                         <asp:Label CssClass="font-label" runat = "server" ID= "pOrganizeName" Text = "rrr" Font-Bold="true" Width="300px"/>
                                                                                    </td>
                                                                            </tr>
                                                                            <tr>
                                                                                    <td>
                                                                                         <asp:Label CssClass="font-label" runat = "server" ID= "lblDescriptionRequest" Text = "รายการเบิกของ          : " Font-Bold="true"/>
                                                                                    </td>
                                                                                    <td colspan="3">
                                                                                         <asp:Label CssClass="font-label" runat = "server" ID= "pDescriptionRequest" Text = "rrr" Font-Bold="true"/>
                                                                                    </td>
                                                                            </tr>
                                                                            <tr>
                                                                                    <td>
                                                                                         <asp:Label CssClass="font-label" runat = "server" ID= "lblRemark" Text = "รายละเอียดเพิ่มเติมสำหรับการเบิกของ          : " Font-Bold="true"/>
                                                                                    </td>
                                                                                    <td colspan="3">
                                                                                         <asp:Label CssClass="font-label" runat = "server" ID= "pRemark" Text = "rrr" Font-Bold="true"/>
                                                                                    </td>
                                                                            </tr>
                                                            </table>
                                                     </div>
                                             </fieldset> 
                                             <asp:Panel ID="panelHeaderList" runat="server" align="center">
                                                        <div class="header-grid">
                                                            <asp:Label ID="lblHeaderList" runat="server" Text="รายละเอียดของทุกหน่วยงานที่มีการเบิกของ"></asp:Label>
                                                        </div>
                                             </asp:Panel>      
                                             <table align="center">
                                                        <tr>
                                                               <td>
                                                                       <telerik:RadGrid ID="grdRequisition" runat="server" AutoGenerateColumns="false"
                                                                                    AllowMultiRowEdit="false" AllowMultiRowSelection="true" ShowStatusBar="true"
                                                                                    Width="690px" Height="270px" AllowPaging="true" AllowFilteringByColumn="true"
                                                                                    GroupingSettings-GroupByFieldsSeparator="&nbsp;&nbsp;&nbsp;&nbsp;"
                                                                                    GroupingSettings-GroupContinuedFormatString=""
                                                                                    GroupingSettings-GroupContinuesFormatString=""
                                                                                    GroupingSettings-GroupSplitFormat=""
                                                                                    OnNeedDataSource="grdRequisition_NeedDataSource" align ="left">
                                                                                    <MasterTableView AllowMultiColumnSorting="True" CellSpacing="-1" GroupLoadMode="Client"
                                                                                        DataKeyNames="requisition_code" NoMasterRecordsText="< ไม่มีข้อมูล >" GroupsDefaultExpanded="true">
                                                                                        <RowIndicatorColumn>
                                                                                            <HeaderStyle Width="20px" />
                                                                                        </RowIndicatorColumn>
                                                                                        <ExpandCollapseColumn>
                                                                                            <HeaderStyle Width="20px" />
                                                                                        </ExpandCollapseColumn>
                                                                                        <Columns>   
                                                                                            <telerik:GridBoundColumn DataField="requisition_code" 
                                                                                                UniqueName="requisition_code"
                                                                                                FilterControlWidth="100%" AutoPostBackOnFilter="true" 
                                                                                                CurrentFilterFunction="Contains" ShowFilterIcon="false" Visible="false" >
                                                                                            </telerik:GridBoundColumn>
                                                                                            <telerik:GridBoundColumn DataField="job_site_seq" 
                                                                                                UniqueName="job_site_seq"
                                                                                                FilterControlWidth="100%" AutoPostBackOnFilter="true" 
                                                                                                CurrentFilterFunction="Contains" ShowFilterIcon="false" Visible="false" >
                                                                                            </telerik:GridBoundColumn>
                                                                                            <telerik:GridBoundColumn DataField="requisiton_des_item" 
                                                                                                UniqueName="requisiton_des_item"
                                                                                                FilterControlWidth="100%" AutoPostBackOnFilter="true" 
                                                                                                CurrentFilterFunction="Contains" ShowFilterIcon="false" Visible="false" >
                                                                                            </telerik:GridBoundColumn>
                                                                                            <telerik:GridBoundColumn DataField="requisition_item" 
                                                                                                UniqueName="requisition_item"
                                                                                                FilterControlWidth="100%" AutoPostBackOnFilter="true" 
                                                                                                CurrentFilterFunction="Contains" ShowFilterIcon="false" Visible="false" >
                                                                                            </telerik:GridBoundColumn>
                                                                                            <telerik:GridBoundColumn DataField="icm_res_item_seq" 
                                                                                                UniqueName="icm_res_item_seq"
                                                                                                FilterControlWidth="100%" AutoPostBackOnFilter="true" 
                                                                                                CurrentFilterFunction="Contains" ShowFilterIcon="false" Visible="false" >
                                                                                            </telerik:GridBoundColumn>
                                                                                            <%--<telerik:GridBoundColumn DataField="icm_res_item_name" 
                                                                                                HeaderText="รายการวัสดุที่เบิกของออก" UniqueName="icm_res_item_name" 
                                                                                                FilterControlWidth="100%" AutoPostBackOnFilter="true"
                                                                                                CurrentFilterFunction="Contains" ShowFilterIcon="false" 
                                                                                                HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Center">
                                                                                            </telerik:GridBoundColumn>--%>
                                                                                            <telerik:GridTemplateColumn DataField="icm_res_item_name" HeaderText="รายการวัสดุที่เบิกของออก" ShowFilterIcon="false" HeaderStyle-Font-Bold="true"
                                                                                                    HeaderStyle-HorizontalAlign="Center" FilterControlWidth="100%" UniqueName="icm_res_item_name">
                                                                                                    <ItemTemplate >                              
                                                                                                            <asp:LinkButton ID="targetControl" runat="server" Text='<%# Eval("icm_res_item_name") %>' 
                                                                                                            OnClientClick='<%# string.Format("return DetailChangeNumber(\"{0}\",\"{1}\",\"{2}\",\"{3}\",\"{4}\",\"{5}\");", Eval("requisiton_des_item"),Eval("job_site_seq"),Eval("icm_res_item_seq"),Eval("movement_code"),Eval("cutstock_real_quantity"),Eval("requisition_code")) %>'  > 
                                                                                                            </asp:LinkButton>
                                                                                                    </ItemTemplate>
                                                                                            </telerik:GridTemplateColumn>
                                                                                            <telerik:GridBoundColumn DataField="quantity" 
                                                                                                HeaderText="จำนวนหน่วยที่ขอเบิก" UniqueName="quantity" HeaderStyle-Width="99px"
                                                                                                FilterControlWidth="100%" AutoPostBackOnFilter="true"
                                                                                                CurrentFilterFunction="Contains" ShowFilterIcon="false" 
                                                                                                HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Center">
                                                                                            </telerik:GridBoundColumn>
                                                                                            <telerik:GridBoundColumn DataField="cutstock_real_quantity" 
                                                                                                HeaderText="จำนวนหน่วยที่ให้เบิกจริง" UniqueName="cutstock_real_quantity" HeaderStyle-Width="99px"
                                                                                                FilterControlWidth="100%" AutoPostBackOnFilter="true"
                                                                                                CurrentFilterFunction="Contains" ShowFilterIcon="false" 
                                                                                                HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Center">
                                                                                            </telerik:GridBoundColumn>
                                                                                        </Columns>
                                                                                        <PagerStyle Mode="NumericPages" AlwaysVisible="true" 
                                                                                            FirstPageToolTip="กลับหน้าแรก" LastPageToolTip="ไปหน้าสุดท้าย" 
                                                                                            NextPagesToolTip="หน้าถัดไป" NextPageToolTip="หน้าถัดไป" 
                                                                                            PrevPagesToolTip="ย้อนกลับ" PrevPageToolTip="ย้อนกลับ" />
                                                                                        </MasterTableView>
                                                                            <GroupingSettings GroupByFieldsSeparator="&nbsp;&nbsp;&nbsp;&nbsp;" 
                                                                                GroupContinuedFormatString="" GroupContinuesFormatString="" 
                                                                                GroupSplitFormat="" />
                                                                            <ClientSettings EnableRowHoverStyle="True">
                                                                                <Selecting AllowRowSelect="true" />
                                                                                <Scrolling AllowScroll="true" UseStaticHeaders="true" />
                                                                            </ClientSettings>
                                                                        </telerik:RadGrid> 
                                                               </td>
                                                        </tr>
                                             </table>        
                             </asp:Panel>
                    </div>
       </div>
       <telerik:RadWindowManager ID="RadWindowManager1" runat="server" >
            <Windows>
                <telerik:RadWindow ID="WindowDetail" runat="server" Width="507px" Height="475px"
                    showcontentduringload="false"  VisibleStatusbar="false"
                    Modal="true" Skin = "Vista" behaviors="Close"
                    title="กรอกรายละเอียดที่ยอมให้ตัดคลังจริง" 
                    OnClientClose="closeRadWindow" >
                </telerik:RadWindow>
            </Windows>
       </telerik:RadWindowManager>                                                        
    </form>
</body>
</html>
